Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow enabling screensaver when game is running #86

Merged
merged 5 commits into from
Nov 10, 2023

Conversation

Aciz
Copy link
Collaborator

@Aciz Aciz commented Nov 6, 2023

SDL by default blocks screensaver/DPMS from running, this allows overriding that via cvar so monitor(s) can sleep while the game is running. vid_restart isn't enough to toggle it unfortunately since SDL hints work in funny ways.

@Aciz Aciz changed the title Allow enabling screensaver when running under SDL Allow enabling screensaver when game is running Nov 6, 2023
@Aciz
Copy link
Collaborator Author

Aciz commented Nov 6, 2023

Added non-SDL support too (for Windows) with r_allowScreenSaver, works on the fly without even requiring a vid_restart. The cvar is Windows only since it interacts with the Win32 API and doesn't work in the event someone would build on other platforms without SDL2.

@ensiform ensiform merged commit 9a38daa into etfdevs:master Nov 10, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants